import type { Library } from '@/api/modules/data/library';
import type { Rule } from 'ant-design-vue/es/form';

const formObj: Library = {
  resId: '',
  name: '',
  type: '0',
  lang: 'zh',
  word: '',
  uri: '',
  md5: '',
  format: '',
  bytes: 0,
  deptId: '',
  sizeId: '',
  createBy: '',
  createTime: '',
  share: '1',
  status: '1',
  oss: '0',
  cover: '',
};
export const form = ref({
  ...formObj,
});

export const formRef = ref();

export const resetForm = () => {
  form.value = {
    ...formObj,
  };
};
export const formRules: Record<string, Rule[]> = {};
